﻿@model ArivisTests.Models.TestPlan
@using ArivisTests.Views;

@{
    ViewBag.Title = "Create";
}

@section Navigation{
    @Html.ActionLink("Test Plans", "Index") &rsaquo; Create
}

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>TestPlan</legend>

        <table class="editor-table">
            <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.Name)
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </td>
            </tr>
            <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.Tests)
        </td>
        <td class="editor-field" style="padding:0">
            @using (var context = new ArivisTests.Models.ArivisTestsDBContext())
            {
                @Html.CheckboxList("scenarios", context.TestScenarios);
            }
            @Html.ValidationMessageFor(model => model.Tests)
        </td>
            </tr>
        </table>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
